package cn.dengl.sky.springboot.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * SpringBoot内的MVC控制器跳转
 * 重写方法描述：实现在url中输入相应的地址的时候直接跳转到某个地址
 *
 */
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        System.out.println("进入路径判断 addViewControllers");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/login1").setViewName("login1");
        registry.addViewController("/main").setViewName("main");
        registry.addViewController("/error").setViewName("error");
                registry.addViewController("/mymain.html").setViewName("/mymain.html");
//        registry.addViewController("/mymain1").setViewName("mymain1");

        registry.addViewController("/treeList").setViewName("/html/sys/tree/treeList");
    /* 理赔案件首页*/
        registry.addViewController("/claim-main").setViewName("/html/claim/claim-main");
    /*本车定损添加页面*/
        registry.addViewController("/claim_add").setViewName("/html/claim/claim_add");
//     三者定损添加页面
        registry.addViewController("/three_fixed_loss_add").setViewName("/html/claim/three_fixed_loss_add");
//        财物定损添加页面
        registry.addViewController("/finance_fixed_loss_add").setViewName("/html/claim/finance_fixed_loss_add");
//       人伤定损添加页面
        registry.addViewController("/human_fixed_loss_add").setViewName("/html/claim/human_fixed_loss_add");

//        报案中心
        registry.addViewController("/claim_center").setViewName("/html/claim/claim_center");
               registry.addViewController("/claim_detail").setViewName("/html/claim/claim_detail");
        registry.addViewController("/fixedLoss_checkPrice_Add").setViewName("/html/claim/fixedLoss_checkPrice_Add");

    }
}
